#pragma once


class D3DVertexBuffer
{
public:
	D3DVertexBuffer(uint8 vertexsize,uint32 vertexNum,DWORD fvf,DWORD primType,DWORD usage);
	~D3DVertexBuffer();

public:
	///lock
	BYTE* Lock(uint32 offset,uint32 size,DWORD flags);
	//unlock
	void unLock();
	///fvf
	//void SetFVF(DWORD fvf);
	///stride
	DWORD GetStride() const { return m_VertexSize; }
	///vb
	ID3DVertexBuffer* GetVB() { return m_pVB; }
	///fvf
	DWORD GetFVF() const { return m_FVF; }
	///primtype
	DWORD GetPrimType() const { return m_primType; }

protected:
	ID3DVertexBuffer* m_pVB;
	uint8	m_VertexSize;
	uint32	m_VertexNum;
	DWORD	m_FVF;
	DWORD   m_primType;
};